import Home from '../views/home/home'
import Public from '../views/public/public'
import Choose from '../views/choose/choose'
import Detail from '../views/detail/detail'
import One from '../views/home/one/one'
import Two from '../views/home/two/two'
import {RouterData} from './router.d'

let routes:RouterData[] = [
    {
        path:'/home',
        component:Home,
        children:[
            {
                path:'/home/one',
                component:One
            },
            {
                path:'/home/two',
                component:Two
            },
            {
                path:'/home',
                redirect:'/home/one'
            }
        ]
    },
    {
        path:'/public',
        component:Public
    },
    {
        path:'/choose/:id',
        component:Choose
    },
    {
        path:'/detail/:id',
        component:Detail
    },
    {
        path:'/',
        redirect:'/home'
    }
];

export default routes